package com.kang.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import com.kang.base.BaseEntity;
import com.kang.util.AESEncrypyHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel(description = "用户")
@TableName(value = "sys_user",autoResultMap = true)
public class SysUser extends BaseEntity {
	
	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "用户名")
	@TableField("username")
	private String username;

	@ApiModelProperty(value = "密码")
	@TableField(value = "password",typeHandler = AESEncrypyHandler.class)
	private String password;

	@ApiModelProperty(value = "姓名")
	@TableField("name")
	private String name;

	@ApiModelProperty(value = "手机")
	@TableField(value = "phone",typeHandler = AESEncrypyHandler.class)
	private String phone;

	@ApiModelProperty(value = "头像地址")
	@TableField("head_url")
	private String headUrl;

	@ApiModelProperty(value = "描述")
	@TableField("description")
	private String description;

	@ApiModelProperty(value = "微信扫码表示")
	@TableField("open_id")
	private String openId;

	@ApiModelProperty(value = "状态（1：正常 0：停用）")
	@TableField("status")
	private Integer status;

	@ApiModelProperty(value = "用户类型（2：系统用户 1：管理员）")
	@TableField("type")
	private Integer type;

	@ApiModelProperty(value = "年龄")
	@TableField("age")
	private Integer age;

	@ApiModelProperty(value = "性别 1:男 2：女")
	@TableField("sex")
	private Integer sex;

	@ApiModelProperty(value = "个性签名")
	@TableField("signature")
	private String signature;

	@ApiModelProperty(value = "邮箱")
	@TableField("mail")
	private String mail;

	@ApiModelProperty(value = "地区")
	@TableField("area")
	private String area;

	@ApiModelProperty(value = "爱好")
	@TableField("habby")
	private String habby;

	@ApiModelProperty(value = "职业")
	@TableField("occupation")
	private String occupation;


	@TableField(exist = false)
	private List<SysRole> roleList;
}

